package cn.kimming.system.controller;

import cn.kimming.common.pojo.Role;
import cn.kimming.common.util.Result;
import cn.kimming.service.IRoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author 刘铭轩
 * date 2021-05-23
 */
@RestController
@RequestMapping("/role")
public class RoleController {
    @Autowired
    private IRoleService roleService;
    @GetMapping("/findOptions")
    public Result findOptions() {
        List<Role> list = roleService.findOptions();
        return new Result(true, "查询成功").addData("list", list);
    }
}
